<div welcome ng-form="welcome" class="welcome container-fluid" ng-show="!peer" ng-controller="UsersettingsController as usersettings">
	<div class="welcome-logo"></div>
	<div ng-if="canJoinRooms()" class="welcome-container">
		<h1>{{_("Enter a room name")}}</h1>
		<div class="form-group welcome-input" ng-class="{'has-error': welcome.$invalid, 'has-success': welcome.$valid && roomdata.name}">
			<input type="text" class="form-control roomdata-link-input input-lg" ng-model="roomdataInput.name" ng-maxlength="30" on-enter="joinRoomByName(roomdata.name)" placeholder="{{roomdata.placeholder}}">
			<div class="welcome-input-buttons">
				<a ng-show="roomdata.last" class="fa fa-refresh" title="{{_('Random room name')}}" ng-click="randomRoom()"></a>
				<button class="btn btn-success btn-roomcreate" title="{{_('Enter room')}}" type="button" ng-disabled="!roomdata.link || welcome.$invalid" ng-click="joinRoomByName(roomdata.name)"><i class="fa fa-sign-in"></i></button>
			</div>
			<welcome-form-extra></welcome-form-extra>
		</div>
		<p class="room-link small"><span><i class="fa fa-link" title="{{_('Room link')}}"></i> <a ng-show="roomdata.name" href="{{roomdata.link}}" ng-click="joinRoomByName(roomdata.name);$event.preventDefault()">{{roomdata.link}}</a></span></p>
		<p ng-show="welcome.$invalid" class="welcome-error text-danger">This room name can not be used. Please choose another name.</p>
		<div class="welcome-login" ng-hide="canCreateRooms()">
			<p class="h4">{{_("Enter the name of an existing room. You can create new rooms when you are signed in.")}}</p>
			<button ng-if="!myuserid && usersettings.loginUserid" type="button" class="btn btn-primary" ng-click="usersettings.loginUserid()">{{_('Sign in')}}</button>
		</div>
		<welcome-extra></welcome-extra>
		<p class="rooms-history" ng-show="roomsHistory.length">
			<span>{{_("Room history")}}</span>
			<br/>
			<a ng-repeat="room in roomsHistory" ng-click="joinRoomByName(room)"><span class="label label-default">{{room}}</span></a>
		</p>
	</div>
	<div ng-if="!canJoinRooms()" class="welcome-container">
		<div class="welcome-login">
			<p class="h4">{{_("Please sign in.")}}</p>
			<button ng-if="!myuserid && usersettings.loginUserid" type="button" class="btn btn-primary" ng-click="usersettings.loginUserid()">{{_('Sign in')}}</button>
		</div>
	</div>
</div>